﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Reflection;
using System.Diagnostics;
using System.IO;
using System.Threading;

namespace TestProject1
{
    [TestClass]
   public class TestExceptions
    {
        [TestMethod]
        [ExpectedException(typeof(FileNotFoundException), "no System exception")]
        public void CheckException1()
        {
            throw new FileNotFoundException("can't find file robin.test");
        }

        [TestMethod]
        [ExpectedException(typeof(SystemException), AllowDerivedTypes = true)]
        public void CheckException2()
        {
            throw new FileNotFoundException("can't find file robin.test");
        }

         [TestMethod]
         [ExpectedException(typeof(AssertFailedException), "no System exception")]
        public void CheckException3()
        {
            Assert.Inconclusive("it's a inconclusive exception");
        }

         [TestMethod]
         [ExpectedException(typeof(AssertFailedException), "no System exception")]
         public void CheckException4()
         {
             Assert.AreEqual<int>(1, 2);
         }
    }
}
